package chai.ning.args;

import java.io.PrintStream;

public class Sinaean
{
  private String name;
  private int age;
  private char gender;
  private boolean married;

  public void assign(String name, int age, char gender, boolean married)
  {
    this.name = name;
    this.age = age;
    this.gender = gender;
    this.married = married;
  }

  public void marry(Sinaean another)
  {
    if (((this.married ? 0 : 1) & (another.married ? 0 : 1)) != 0) {
      if (((this.gender == '女' ? 1 : 0) & (another.gender == '男' ? 1 : 0)) != 0) {
        if (((this.age >= 20 ? 1 : 0) & (another.age >= 22 ? 1 : 0)) != 0)
          System.out.println("Y");
        else
          System.out.println("No");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  }

  public static void main(String[] args)
  {
    Sinaean p = new Sinaean();
    p.name = "史";
    p.age = 22;
    p.gender = '男';
    p.married = false;

    Sinaean q = new Sinaean();
    q.assign("付", 22, '女', false);
    q.marry(p);
  }
}